module arr_red_mthd;

byte b[] = '{1, 2, 3, 4};
int sum, product, b_xor ;

initial
begin
   sum = b.sum ; // 1+2+3+4
   product = b.product; // 1*2*3*4
   b_xor = b.xor with (item+4); // 5^6^7^8

   $display(" sum is %0d\n product is %0d\n xor is %b", sum, product, b_xor);

end

endmodule
